package com.broada.apm.dao.impl;

import java.util.List;

import com.broada.apm.dao.LuaSettingsDao;
import com.broada.apm.model.LuaSetting;

public class MysqlLuaSettingsDao extends MysqlAbstractDao implements LuaSettingsDao{
	
	public static final String SERVICE_NAMESPACE = "com.broada.apm.dao.ServiceDao.";
	
	@Override
	public void saveLuaSettings(LuaSetting setting) {
		getSqlSession().insert(SERVICE_NAMESPACE + "addLuaSetting", setting);
	}

	@Override
	public void deleteLuaSettingsByServiceId(String serviceId) {
		getSqlSession().insert(SERVICE_NAMESPACE + "deleteLuaSettingsByServiceId", serviceId);
	}

	@Override
	public List<LuaSetting> queryLuaSettings(String serviceId) {
		return getSqlSession().selectList(SERVICE_NAMESPACE + "getLuaSettingsByServiceId", serviceId);
	}
}
